<%-- 
    Document   : brandMaintenance
    Created on : Jun 12, 2012, 5:13:37 PM
    Author     : Owner
--%>

<%@include file="/jsp/adminTop.jsp" %>
<html>
    <head>
        <title>Manage Brands</title>        
    </head>
    <body>
        <div class="clear"></div>
        <table cellspacing="5px" width="100%" align="center">
            <tr>
                <td>
                    <table cellspacing="5px" width="100%" align="center">
                        <tr>
                            <td style="vertical-align: top;" width="20%">
                                <%@include file="/jsp/right.jsp" %>
                            </td>
                            <td style="vertical-align: top;" width="80%">
                                <div class="page-title"><h1>Manage Brands</h1></div>
                                <table align="center" border="1" cellspacing="10px" width="100%" >
                                    <tr>
                                        <td width="50%" style="vertical-align: bottom">
                                            <a href="./brand.do?action=showAddBrand"><span>Add New Brand</span></a>
                                        </td>
                                        <td width="50%">
                                            <html:form action="/brand" method="post">
                                                <table border="1" align="center" cellspacing="5px" width="100%">
                                                    <tr>
                                                        <td align="right">Brand Name:
                                                            <html:select property="searchBrand">
                                                                <html:option value="All">All</html:option>
                                                                <html:option value="A">A</html:option><html:option value="B">B</html:option><html:option value="C">C</html:option><html:option value="D">D</html:option><html:option value="E">E</html:option><html:option value="F">F</html:option>
                                                                <html:option value="G">G</html:option><html:option value="H">H</html:option><html:option value="I">I</html:option><html:option value="J">J</html:option><html:option value="K">K</html:option><html:option value="L">L</html:option>
                                                                <html:option value="M">M</html:option><html:option value="N">N</html:option><html:option value="O">O</html:option><html:option value="P">P</html:option><html:option value="Q">Q</html:option><html:option value="R">R</html:option>
                                                                <html:option value="S">S</html:option><html:option value="T">T</html:option><html:option value="U">U</html:option><html:option value="V">V</html:option><html:option value="W">W</html:option><html:option value="X">X</html:option>
                                                                <html:option value="Y">Y</html:option><html:option value="Z">Z</html:option><html:option value="0">0</html:option><html:option value="1">1</html:option><html:option value="2">2</html:option><html:option value="3">3</html:option>
                                                                <html:option value="4">4</html:option><html:option value="5">5</html:option><html:option value="6">6</html:option><html:option value="7">7</html:option><html:option value="8">8</html:option><html:option value="9">9</html:option>
                                                            </html:select>
                                                        </td>
                                                        <td style="vertical-align: bottom">
                                                            <a onclick="javascript:searchBrand('./brand.do?action=searchBrandbyName','BrandBean')">
                                                                <img alt="Find" src="images/find.png" onmouseover="src='images/find-hover.png'" onmouseout="src='images/find.png'" />
                                                            </a>
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td align="right">Status:
                                                            <html:select property="brandStatusId">
                                                                <html:option value="0">N/A</html:option>
                                                                <html:options collection="statusList" property="key" labelProperty="value"/>
                                                            </html:select>
                                                        </td>
                                                        <td style="vertical-align: bottom">
                                                            <a onclick="javascript:searchBrand('./brand.do?action=searchBrandbyStatus','BrandBean')">
                                                                <img alt="Find" src="images/find.png" onmouseover="src='images/find-hover.png'" onmouseout="src='images/find.png'" />
                                                            </a>
                                                        </td>
                                                    </tr>
                                                </table>
                                            </html:form>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td colspan="2">
                                            <table border="1" cellspacing="10px" id="results" align="center" width="100%">
                                                <colgroup>
                                                    <col width="5%">
                                                    <col width="30%">
                                                    <col width="30%">
                                                    <col width="15">
                                                    <col width="10%">
                                                    <col width="10%">
                                                </colgroup>
                                                <tr>
                                                    <td><strong>ID</strong></td>
                                                    <td><strong>Brand</strong></td>
                                                    <td><strong>Description</strong></td>
                                                    <td><strong>Status</strong></td>
                                                    <td><strong>Edit</strong></td>
                                                    <%--<td><input type="checkbox" name="allCheck" value="Check" onClick="javascript:return checkedAll('BrandBean');" >
                                                        <input type="checkbox" name="allCheck" value="UnCheck" onClick="javascript:return unCheckedAll('BrandBean');" style="display: none"></td>--%>
                                                    <td><strong>Delete</strong></td>
                                                </tr>
                                                <logic:notPresent name="brandList" scope="request">
                                                    <tr>
                                                        <td colspan="6"> No records Found </td>
                                                    </tr>
                                                </logic:notPresent>
                                                <logic:present name = "brandList" scope="request">
                                                    <logic:iterate id="brands" name="brandList" scope="request">
                                                        <tr>
                                                            <td><bean:write name="brands" property="brandId"/></td>
                                                            <td><bean:write name="brands" property="brandName"/></td>
                                                            <td><bean:write name="brands" property="brandDesc"/></td>
                                                            <td><bean:write name="brands" property="brandStatus"/></td>
                                                            <td>[<a href="./brand.do?action=showEditBrand&brandId=<bean:write name="brands" property="brandId"/>" >Edit</a>]</td>
                                                            <%--<td>
                                                                    <input type="checkbox" name="brandCheck" value="<bean:write name="brands" property="brandId"/>">
                                                                </td>--%>
                                                            <td><a href="./brand.do?action=deleteBrand&brandId=<bean:write name="brands" property="brandId"/>" >Delete</a></td>
                                                        </tr>
                                                    </logic:iterate>
                                                </logic:present>
                                            </table>
                                        </td>
                                    </tr>
                                </table>
                                <div id="pageNavPosition" align="center"></div>

                                <script type="text/javascript"><!--
                                    var pager = new Pager('results', 12);
                                    pager.init();
                                    pager.showPageNav('pager', 'pageNavPosition');
                                    pager.showPage(1);
                                    //--></script>
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
            <tr>
                <td><%@include file="/jsp/footer.jsp" %></td>
            </tr>
        </table>

    </body>
</html>
